package lab2.text31;
import com.sun.org.apache.xpath.internal.SourceTree;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by Administrator on 2017/11/20.
 */
public class Text {
    public static void main(String[] args) {
        List<String> names=new ArrayList<>();
        names.add("张三");
        names.add("李四");
        names.add("王五");
        names.add("马六");
        names.add("赵七");
        for(String name:names){
            System.out.println(name.indexOf(name)+"|"+name);
        }
        System.out.println("大小："+names.size());
        String delName=names.remove(2);
        System.out.println("删除的元素是："+delName);
        System.out.println(names.get(2));
        System.out.println("目前第三个元素是："+names.get(2));
        System.out.println("集合大小："+names.size());

    }
}
